/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.wx.entity;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;

/**
 * 商家和组的对应关系表Entity
 * @author wangjianxin
 * @version 2018-12-03
 */
@Table(name="wx_business_group", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="office_code", attrName="officeCode", label="机构code码"),
		@Column(name="business_ids", attrName="businessIds", label="商家ids"),
		@Column(name="config_group_id", attrName="configGroupId", label="机构配置的商家组id"),
		@Column(includeEntity=DataEntity.class),
		@Column(name="apply_business_ids", attrName="applyBusinessIds", label="主推商家ids"),
		@Column(name="sort_business_Ids", attrName="sortBusinessIds", label="商家logo排序"),
	}, orderBy="a.update_date DESC"
)
public class WxBusinessGroup extends DataEntity<WxBusinessGroup> {
	
	private static final long serialVersionUID = 1L;
	private String officeCode;		// 机构code码
	private String businessIds;		// 商家ids
	private Long configGroupId;		// 机构配置的商家组id
	private String applyBusinessIds;		// 主推商家ids
	/**
	 * 商家logo排序
	 */
	private String sortBusinessIds;
	
	public WxBusinessGroup() {
		this(null);
	}

	public WxBusinessGroup(String id){
		super(id);
	}
	
	@NotBlank(message="机构code码不能为空")
	@Length(min=0, max=200, message="机构code码长度不能超过 200 个字符")
	public String getOfficeCode() {
		return officeCode;
	}

	public void setOfficeCode(String officeCode) {
		this.officeCode = officeCode;
	}

	public String getBusinessIds() {
		return businessIds;
	}

	public void setBusinessIds(String businessIds) {
		this.businessIds = businessIds;
	}

	@NotNull(message="机构配置的商家组id不能为空")
	public Long getConfigGroupId() {
		return configGroupId;
	}

	public void setConfigGroupId(Long configGroupId) {
		this.configGroupId = configGroupId;
	}
	
	@Length(min=0, max=300, message="主推商家ids长度不能超过 300 个字符")
	public String getApplyBusinessIds() {
		return applyBusinessIds;
	}

	public void setApplyBusinessIds(String applyBusinessIds) {
		this.applyBusinessIds = applyBusinessIds;
	}

	public String getSortBusinessIds() {
		return sortBusinessIds;
	}

	public void setSortBusinessIds(String sortBusinessIds) {
		this.sortBusinessIds = sortBusinessIds;
	}
}